<?php 
class MyorderController extends Controller{
	public function index(){
//		获得购物车信息
        $goodsData=Cart::getGoods();
		
//		p($goodsData);
		$this->assign("goodsData",$goodsData);
		$alltotal=Cart::getTotalPrice();
		$this->assign("alltotal",$alltotal);
		$addressData=$_SESSION['address'];
		p($addressData);
		$this->assign('addressData',$addressData);
		$this->display();
	}
	public function saveAddress(){
		if(IS_AJAX){
			$data=$_POST;
//			组合数组添加到SESSION中
            $_SESSION['address'][]=$_POST;
			

			echo json_encode($data);
			exit;
		}
		
		
	}
}
?>